home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / May 96 / Re FW_CStorageUnitSink < prev    next >
Encoding:
Internet Message Format  |  1996-12-03  |  1.9 KB  |  [TEXT/ttxt]

  1. Subject:     Re: FW_CStorageUnitSink
  2. Sent:        5/29/96 5:27 PM
  3. Received:    5/29/96 4:51 PM
  4. From:        John Paulson, john_paulson@powertalk.apple.com
  5. Reply-To:    ODF Interest, ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8.  
  9.   FW_OStorageUnitSinks are not buffered.  If you want to buffer i/o to an
  10. FW_OStorageUnitSink, 
  11. create an FW_OStorageUnitSink and use an FW_PBufferedSink.  However there is a
  12. caveat wrt 
  13. buffering ODStorageUnits:
  14.  
  15.       Buffering sinks for reading is cool, buffering sinks for writing is
  16. not-so-cool.
  17.  
  18. This is because the sink being buffered is frequently written to without going
  19. through the buffer.  
  20. This occurs when your part writes to the buffered sink and you pass the
  21. ODStorageUnitSink to 
  22. another routine (call it "foo") which writes to it.  The data in the buffer is
  23. flushed at the wrong 
  24. place, overwriting the data the "foo" routine wrote.  There is no problem
  25. using buffered sinks for 
  26. reading, as the FW_OBufferedSink checks that the buffer position is valid
  27. before reading from the 
  28. buffer.  That check cannot be done for writing.
  29.  
  30. munch
  31.  
  32.  ------ From: ODF-Interest@CILabs.ORG, Wed, May 29, 1996 ------ 
  33.  
  34. I've started converting from d11 and have a problem : I'm using
  35. FW_CStorageUnitSink::Read/Write
  36.  
  37. FW_CStorageUnitSink - converted to SOM class FW_OStorageUnitSink; use
  38. FW_PStorageUnitSink
  39. FW_CStorageUnitSink::FW_CStorageUnitSink - use FW_PStorageUnitSink; (*) ev
  40. param added
  41. FW_CStorageUnitSink::Flush - gone; moved to FW_OBufferedSink
  42. FW_CStorageUnitSink::ReadPeek - gone; moved to FW_OBufferedSink
  43. FW_CStorageUnitSink::ReadPeekAdvance - gone; moved to FW_OBufferedSink
  44. FW_CStorageUnitSink::WritePeek - gone; moved to FW_OBufferedSink
  45. FW_CStorageUnitSink::WritePeekAdvance - gone; moved to FW_OBufferedSink
  46.  
  47. Nice! But how can I get a FW_OBufferedSink having a FW_PStorageUnitSink ???
  48.  
  49. Stephane.
  50.  
  51.  
  52.  
  53.